3.1694 \(\int \sqrt {a+\frac {b}{x}} \, dx\)

Optimal. Leaf size=39 \[ x \sqrt {a+\frac {b}{x}}+\frac {b \tanh ^{-1}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right )}{\sqrt {a}} \]

[Out]

b*arctanh((a+b/x)^(1/2)/a^(1/2))/a^(1/2)+x*(a+b/x)^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 39, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.364, Rules used = {242, 47, 63, 208} \[ x \sqrt {a+\frac {b}{x}}+\frac {b \tanh ^{-1}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right )}{\sqrt {a}} \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[a + b/x],x]

[Out]

Sqrt[a + b/x]*x + (b*ArcTanh[Sqrt[a + b/x]/Sqrt[a]])/Sqrt[a]

Rule 47

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)*(c + d*x)^n)/(b*
(m + 1)), x] - Dist[(d*n)/(b*(m + 1)), Int[(a + b*x)^(m + 1)*(c + d*x)^(n - 1), x], x] /; FreeQ[{a, b, c, d},
x] && NeQ[b*c - a*d, 0] && GtQ[n, 0] && LtQ[m, -1] &&  !(IntegerQ[n] &&  !IntegerQ[m]) &&  !(ILeQ[m + n + 2, 0
] && (FractionQ[m] || GeQ[2*n + m + 1, 0])) && IntLinearQ[a, b, c, d, m, n, x]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rule 242

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> -Subst[Int[(a + b/x^n)^p/x^2, x], x, 1/x] /; FreeQ[{a, b, p},
x] && ILtQ[n, 0]

Rubi steps

\begin {align*} \int \sqrt {a+\frac {b}{x}} \, dx &=-\operatorname {Subst}\left (\int \frac {\sqrt {a+b x}}{x^2} \, dx,x,\frac {1}{x}\right )\\ &=\sqrt {a+\frac {b}{x}} x-\frac {1}{2} b \operatorname {Subst}\left (\int \frac {1}{x \sqrt {a+b x}} \, dx,x,\frac {1}{x}\right )\\ &=\sqrt {a+\frac {b}{x}} x-\operatorname {Subst}\left (\int \frac {1}{-\frac {a}{b}+\frac {x^2}{b}} \, dx,x,\sqrt {a+\frac {b}{x}}\right )\\ &=\sqrt {a+\frac {b}{x}} x+\frac {b \tanh ^{-1}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right )}{\sqrt {a}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 39, normalized size = 1.00 \[ x \sqrt {a+\frac {b}{x}}+\frac {b \tanh ^{-1}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right )}{\sqrt {a}} \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[a + b/x],x]

[Out]

Sqrt[a + b/x]*x + (b*ArcTanh[Sqrt[a + b/x]/Sqrt[a]])/Sqrt[a]

________________________________________________________________________________________

fricas [A]  time = 1.05, size = 99, normalized size = 2.54 \[ \left [\frac {2 \, a x \sqrt {\frac {a x + b}{x}} + \sqrt {a} b \log \left (2 \, a x + 2 \, \sqrt {a} x \sqrt {\frac {a x + b}{x}} + b\right )}{2 \, a}, \frac {a x \sqrt {\frac {a x + b}{x}} - \sqrt {-a} b \arctan \left (\frac {\sqrt {-a} \sqrt {\frac {a x + b}{x}}}{a}\right )}{a}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b/x)^(1/2),x, algorithm="fricas")

[Out]

[1/2*(2*a*x*sqrt((a*x + b)/x) + sqrt(a)*b*log(2*a*x + 2*sqrt(a)*x*sqrt((a*x + b)/x) + b))/a, (a*x*sqrt((a*x +
b)/x) - sqrt(-a)*b*arctan(sqrt(-a)*sqrt((a*x + b)/x)/a))/a]

________________________________________________________________________________________

giac [B]  time = 0.20, size = 64, normalized size = 1.64 \[ -\frac {b \log \left ({\left | -2 \, {\left (\sqrt {a} x - \sqrt {a x^{2} + b x}\right )} \sqrt {a} - b \right |}\right ) \mathrm {sgn}\relax (x)}{2 \, \sqrt {a}} + \frac {b \log \left ({\left | b \right |}\right ) \mathrm {sgn}\relax (x)}{2 \, \sqrt {a}} + \sqrt {a x^{2} + b x} \mathrm {sgn}\relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b/x)^(1/2),x, algorithm="giac")

[Out]

-1/2*b*log(abs(-2*(sqrt(a)*x - sqrt(a*x^2 + b*x))*sqrt(a) - b))*sgn(x)/sqrt(a) + 1/2*b*log(abs(b))*sgn(x)/sqrt
(a) + sqrt(a*x^2 + b*x)*sgn(x)

________________________________________________________________________________________

maple [B]  time = 0.01, size = 74, normalized size = 1.90 \[ \frac {\sqrt {\frac {a x +b}{x}}\, \left (b \ln \left (\frac {2 a x +b +2 \sqrt {a \,x^{2}+b x}\, \sqrt {a}}{2 \sqrt {a}}\right )+2 \sqrt {a \,x^{2}+b x}\, \sqrt {a}\right ) x}{2 \sqrt {\left (a x +b \right ) x}\, \sqrt {a}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b/x)^(1/2),x)

[Out]

1/2*((a*x+b)/x)^(1/2)*x*(2*(a*x^2+b*x)^(1/2)*a^(1/2)+b*ln(1/2*(2*a*x+b+2*(a*x^2+b*x)^(1/2)*a^(1/2))/a^(1/2)))/
((a*x+b)*x)^(1/2)/a^(1/2)

________________________________________________________________________________________

maxima [A]  time = 2.38, size = 50, normalized size = 1.28 \[ \sqrt {a + \frac {b}{x}} x - \frac {b \log \left (\frac {\sqrt {a + \frac {b}{x}} - \sqrt {a}}{\sqrt {a + \frac {b}{x}} + \sqrt {a}}\right )}{2 \, \sqrt {a}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b/x)^(1/2),x, algorithm="maxima")

[Out]

sqrt(a + b/x)*x - 1/2*b*log((sqrt(a + b/x) - sqrt(a))/(sqrt(a + b/x) + sqrt(a)))/sqrt(a)

________________________________________________________________________________________

mupad [B]  time = 0.09, size = 58, normalized size = 1.49 \[ x\,\sqrt {a\,x^2+b\,x}\,\sqrt {\frac {1}{x^2}}+\frac {b\,x\,\ln \left (\frac {\frac {b}{2}+a\,x+\sqrt {a}\,\sqrt {a\,x^2+b\,x}}{\sqrt {a}}\right )\,\sqrt {\frac {1}{x^2}}}{2\,\sqrt {a}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b/x)^(1/2),x)

[Out]

x*(b*x + a*x^2)^(1/2)*(1/x^2)^(1/2) + (b*x*log((b/2 + a*x + a^(1/2)*(b*x + a*x^2)^(1/2))/a^(1/2))*(1/x^2)^(1/2
))/(2*a^(1/2))

________________________________________________________________________________________

sympy [A]  time = 2.01, size = 42, normalized size = 1.08 \[ \sqrt {b} \sqrt {x} \sqrt {\frac {a x}{b} + 1} + \frac {b \operatorname {asinh}{\left (\frac {\sqrt {a} \sqrt {x}}{\sqrt {b}} \right )}}{\sqrt {a}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b/x)**(1/2),x)

[Out]

sqrt(b)*sqrt(x)*sqrt(a*x/b + 1) + b*asinh(sqrt(a)*sqrt(x)/sqrt(b))/sqrt(a)

________________________________________________________________________________________